package com.hs.es.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @Description: 索引为sys_user的实体
 * @Author 胡尚
 * @Date: 2024/8/11 17:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "sys_user")
public class UserEntity {
    @Id
    private Long id;
    @Field(type = FieldType.Keyword)
    private String name;
    private int sex;
    private int age;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String address;
    private String remark;
}
